package cn.alm.springmvcrestfulcrud.controller;

import cn.alm.springmvcrestfulcrud.common.CR;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("ex")
public class ExceptionController {

    @GetMapping("test")
    public CR test() {
        int i = 10 / 0;
        return CR.fail("测试异常");
    }
}
